﻿<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
            <Title>01 -- StyledProperty</Title>
            <Shortcut>styledProperty</Shortcut>
            <Description>Define StyledProperty.</Description>
            <Author>Avalonia Team</Author>
        </Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID>property</ID>
                    <ToolTip>Property Name</ToolTip>
                    <Default>IsCapable</Default>
                </Literal>
                <Literal>
                    <ID>type</ID>
                    <ToolTip>Property Type</ToolTip>
                    <Default>bool</Default>
                </Literal>
                <Literal>
                    <ID>ownerclass</ID>
                    <ToolTip>The owning class of this property (which is typically the class in which it is declared).</ToolTip>
                    <Default>ownerclass</Default>
                    <Function>ClassName()</Function>
                </Literal>
                <Literal>
                    <ID>defaultvalue</ID>
                    <ToolTip>The default value for this property.</ToolTip>
                    <Default>default</Default>
                </Literal>
                <Literal Editable="true">
                    <ID>desc</ID>
                    <ToolTip>A description for the property.</ToolTip>
                    <Default>...</Default>
                    <Function></Function>
                </Literal>
            </Declarations>
            <Code Language="csharp">
                <![CDATA[
        /// <summary>
        /// $property$ StyledProperty definition
        /// </summary>
                public static readonly StyledProperty<$type$> $property$Property =
                    AvaloniaProperty.Register<$ownerclass$, $type$>(nameof($property$));

        /// <summary>
        /// Gets or sets the $property$ property. This StyledProperty
        /// indicates $desc$.
        /// </summary>
        public $type$ $property$
        {
            get => this.GetValue($property$Property);
            set => SetValue($property$Property, value);
        }

        $end$]]>
            </Code>
            <Imports>
                <Import>
                    <Namespace>Avalonia</Namespace>
                </Import>
            </Imports>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>
